home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1268 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  47 lines

  1. Path: polo.iquest.com!news
  2. From: gbrown@colsa.com (Greg Brown)
  3. Newsgroups: comp.lang.c
  4. Subject: RPC Question
  5. Date: 12 Jan 1996 18:15:22 GMT
  6. Organization: Colsa
  7. Distribution: world
  8. Message-ID: <4d68fq$p9b@polo.iquest.com>
  9. NNTP-Posting-Host: 199.172.89.47
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.99.4
  12.  
  13. Here's a question for you RPC programmers out there.  Let's say that
  14. I am trying to write an RPC client/server to read password file 
  15. entries on remote systems.  The .x file might look something like this:
  16.  
  17. union passwd_res switch(int errno)
  18. {
  19.     case 0:
  20.         struct passwd *dptr;
  21.     default:
  22.         void;
  23. };
  24.  
  25. program PASSWDPROG
  26. {
  27.     version PASSWDVERS
  28.     {
  29.         int SETPWENT(void) = 1;
  30.         int SETPWFILE(string) = 2;
  31.         passwd_res GETPWENT(void) = 3;
  32.         int ENDPWENT(void) = 4;
  33.     } = 1;
  34. } = 76;
  35.  
  36. No problems so far.  But let's say that I wanted to add another 
  37. function, like fgetpwent, which takes a FILE * as it's argument.
  38. What would the syntax be for adding this entry to the program/version
  39. structure above?  ie,
  40.  
  41. passwd_res FGETPWENT(??????) = 5;      
  42.  
  43. Thanks in advance!
  44.  
  45. Greg Brown (gbrown@colsa.iquest.com)
  46.  
  47.